import service from "./request"

// 系列表
export function departmentGetPage(params, page) {
    return service({
        url: '/admin/department/page/' + page,
        method: 'get',
        params: params
    })
}

// 系页数
export function departmentGetPageCount() {
    return service({
        url: '/admin/department/page/count',
        method: 'get',
    })
}


export function departmentAdd(data) {
    return service({
        url: "/admin/department",
        method: "post",
        data: data
    })
}

export function departmentDelete(id) {
    return service({
        url: '/admin/department/' + id,
        method: 'delete',
    })
}


//通过id获取系信息
export function departmentInfo(id) {
    return service({
        url: '/admin/department/' + id,
        method: 'get',
    })
}


export function departmentEdit(data) {
    return service({
        url: '/admin/department',
        method: 'put',
        data: data
    })
}